﻿<html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 

<script src="./jquery-1.11.0.min.js"></script>
<style>

body{background:#05164c;font-family:"微软雅黑";color:#fff;}
.main{width:1000px;margin:0 auto;text-align:center;background:url(./bg.jpg) no-repeat;height:100%;}
.bottle{width:60%;float:left;}
.face{width:20%;float:left;padding-top: 100px;}
.process{width:60px;height:600px;border:10px #000 solid;position:relative;margin-left:30%;margin-top:10%;}
.bodong{top:0px;background:#1ba3f9;height:10px;position:absolute;width:60px;}
.jindu{background:#1ba3f9;width:60px;position:absolute;bottom:0px;
color:#fff;font-size:1.5em;font-weight:700px;
}
#flash{position:fixed;width:100%;height:100%;top:0px;}
.prize{background:url(./luckbg.png) no-repeat;margin:10% auto;width:800px;height:518px;top:0px;z-index:2;}
.showprize{position:fixed;background:rgba(0, 0, 0, 0.6);width:100%;height:100%;display:none;z-index:2;top:0px;}
.prizename{  font-weight: 700;
  font-size: 60px;
  text-align: center;
  padding-top: 160px;
 color:#fff; 
}
#bl{z-index:1;display:block;}
</style>
	
	</head>

<body>

<div class="main">
<div><h1>顶上集成吊顶2015年蓝海行动摇一摇活动</h1></div>
<div class="bottle">
<div class="process">
<div class="jindu" style="height:570px;">
<div class="bodong"></div>
<span id="bl">50%</span></div>
</div>
</div>
<div class="face">
<img src="./default_pair.jpg" id="face"><br>
<span id="nickname">求上台</span>
<div><a href="javascript:run()">涨</div></div>
</div>




<div class="showprize">
<div class="prize">
<div class="prizename">即返20%</div>
</div>
</div>
<div id="flash" style="display: none;">


    <object type="application/x-shockwave-flash" data="./shake.swf" width="1600" height="1200">
        <param name="quality" value="high">
        <param name="wmode" value="opaque">
        <param name="wmode" value="transparent">
        <param name="swfversion" value="6.0.65.0">
    </object>
</div>


<input type="hidden" name="maxid" id="maxid" value="1">
</div>
</body>
</html>
<script>
$(function(){
 setInterval(bodong,1000);
 bfb();
setInterval(weixin,2000);
 })
function bodong(){

$(".bodong").animate({"top":"-10px"},500,function(){
 $(".bodong").animate({"top":"0px"},500);
})

}


function  weixin(){
var id=$(".maxid").val();
$.post("./index.php?yao/sync",{maxid:id},function(data){
  if(!data.status){
  return;
  }
  var d=data.data;
  $("#face").attr("src",d.headimgurl);
  $("#nickname").html(d.nickname);
  $("#maxid").val(d.id);
},"json")
}

function bfb(){
var height=$(".jindu").height();
var bl=Math.round(height*1000/600/5)/10;
$("#bl").html(bl+"%");
}

function run(){
var height=$(".jindu").height();
height+=20;
if(height>600){
$("#flash").show();

setTimeout(function(){
$(".showprize").fadeIn();

},500);
return false;
}
var bl=Math.round(height*1000/600/5)/10;
$("#bl").html(bl+"%");
$(".jindu").animate({"height":height},200);
}
</script>